<template>
  <div class="about">
      <img :src="detailData.pic" alt="">
      <article>
          <p>{{detailData.name}}</p>
      </article>
  </div>
</template>

<script>
import axios from "axios";
export default {
  data() {
    return {
      detailData: [],
    };
  },
  mounted() {
    axios.get("tapList.json").then((res) => {
      console.log(res.data.data);
      let arr = [...res.data.data.map((item) => item.child)].flat(Infinity);
      this.detailData = arr.find((item) => item.id == this.$route.query.id);
      console.log(this.goodsData);
    });
  },
  methods: {},
  components: {},
};
</script>

<style lang="scss">
article{
    width: 100%;
    height: 100px;
    background-color: rgb(61, 231, 223);
}
.about {
    img{
        width: 100%;
        height: 300px;
    }
}
</style>
